<template>
  <view class="base-title">
    <image src="../static/img/back-black.png" @tap="back"></image>
    <view class="base-title-text">{{title}}</view>
  </view>
</template>

<script>
export default {
  props: {
    title: {
      type: String,
      default: '标题'
    },
  },
  methods: {
    back() {
      this.$emit('back')
    }
  }
}
</script>

<style lang="scss" scoped>
.base-title {
  position: relative;
  text-align: center;
  width: 178px;
  font-family: PingFang SC;
  font-weight: 500;
  line-height: 39upx;
  color: #323232;
  opacity: 1;
  width: 100%;
  
  image {
    width: 36upx;
    height: 32upx;
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
  }

  .base-title-text {
    height: 50upx;
    line-height: 50upx;
  }
}
</style>